package com.yxym.homework;

public class homework02 {
    public static void main(String[] args) {
    }
}

class Frock{
    private static int currentNum = 100000;
    public static int  getNextNum(){
        currentNum += 100;//增加100
        return currentNum;
    }
    private int serialNumber;
    public int getSerialNumber() {
        return serialNumber;
    }
    public Frock(){
        serialNumber = getNextNum();
    }
}
class TestFrock{
    public static void main(String[] args) {
        System.out.println(Frock.getNextNum());
        System.out.println(Frock.getNextNum());
        Frock frock  = new Frock();
        Frock frock1  = new Frock();
        Frock frock2 = new Frock();
        System.out.println(frock.getSerialNumber());
        System.out.println(frock1.getSerialNumber());
        System.out.println(frock2.getSerialNumber());
    }
}